package com.biodiv.miracle.event.listener;

import com.biodiv.miracle.event.core.EventListener;
import com.biodiv.miracle.event.ErrorEvent;

import java.util.logging.Level;
import java.util.logging.Logger;

/**
 * @author: tianquan
 * @date: 2025-05-28  09:25
 * @description: 错误事件监听器
 */
public class ErrorEventListener implements EventListener<ErrorEvent> {

    private final Logger logger = Logger.getLogger(ErrorEventListener.class.getName());

    @Override
    public void onEvent(ErrorEvent event) {
        Throwable throwable = event.getThrowable();
        logger.log(Level.SEVERE, "容器刷新中出现异常", throwable);
    }

}
